<!DOCTYPE>
<html>
<head>
<!-- 浏览器中显示自己的图表-->
<link rel="icon" href="../img/coco.png" type="image/x-icon" />
<link rel="shortcut icon" href="../img/coco.png" type="image/x-icon" />
<title>vue.js demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="vue.js学习" />
<script src="https://cdn.bootcss.com/vue/2.4.2/vue.min.js"></script>
</head>
    <body>
        <div>
            <audio controls autoplay="autopaly">
                <source src="renxi.mp3" type="audio/mp3" />
            </audio>
        </div>
    	<div id="app">
            {{ message.split('').reverse().join('') }}
            <p>原始字符串:{{ message }}</p>
            <p>计算后反转字符串: {{ reversedMessage }}</p>
            <p>计算后反转字符串: {{ reversedMessage2() }}</p>
        </div>

      <script>
        new Vue({
          el:'#app',
          data:{
            message:'value321'
          },
          computed:{
              reversedMessage:function(){
                  return this.message.split('').reverse().join('')
              }
            },
            methods: {
                reversedMessage2:function () {
                    return this.message.split('').reverse().join('')
                }
            }
        })
      </script>
    </body>
</html>
